package com.situ.shoplook.common.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 商品类别
 */
@Getter
@Setter
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
public class Category implements Serializable {
    @EqualsAndHashCode.Include
    private Integer id;
    private String name;
    private String alias;
    private String icon;
    private Integer seq;//序号
    private String description;
    private Integer parentId;//父类别编号
    /**
     * 创建时间
     */
    @JsonFormat( pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @DateTimeFormat( pattern = "yyyy-MM-dd HH:mm")
    private Date createTime;

    private List<Category> children;//所有子类别
}
